package com.hwl.demo16;

import com.hwl.demo16.entity.Singleton;

/**
 * 单例模式
 *
 * @author sentry
 * @since 2023-03-25
 */
public class Main {

    public static void main(String[] args) {
        Singleton instance1 = Singleton.getInstance();
        Singleton instance2 = Singleton.getInstance();
        System.out.println(instance1 == instance2);
        System.out.println(instance1.equals(instance2));
    }
}
